<include file="./App/Tpl/Home/Default/Public/header.html" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="__JS__/qtip/css/jquery.qtip.min.css" rel="stylesheet" type="text/css" />
<literal>
<script>
$(document).ready(function(){
	$("#CRLOGIN").click(function(){
		$('#CRForm').ajaxSubmit(options); 
		
	});
	$("#SRVLOGIN").click(function(){
		
		$('#SRVForm').ajaxSubmit(options1); 
	});
	var options={
			 beforeSubmit:  showRequest,  
			 success:       showResponse  
	};
	var options1={
			 beforeSubmit:  showRequest1,  
			 success:       showResponse1  
	};
	function showRequest(formData, jqForm, options) {  
		if($("#userName").val()==""){
			userTip("userName","请输入用户名");
			return false;
		}
		if($("#userPwd").val()==""){
			userTip("userPwd","请输入密码");
			return false;
		}
		return true;
	}
	
	function showResponse(responseText, statusText, xhr, $form)  { 
		eval("var data="+responseText);
		
		var type='2';
		var info="系统错误！";
		var url="?g=Home&m=Skin&a=login";
		var rs=parseInt(data.status);
		if(rs==1){
			//登录成功
			type='1';
			info="登录成功！";
			url="?g=Home&m=Skin&a=olist";
		}else if(rs==3){
			//用户名错误
			type='2';
			info="用户名错误！";
			
		}else if(rs==4){
			//密码错误
			type='2';
			info="密码错误！";
			
		}else if(rs==5){
			//密码错误
			type='2';
			info="无权限登录！";
			
		}
		window.location.href="?g=Home&m=Skin&a=message&type="+type+"&info="+encodeURI(info)+"&url="+encodeURIComponent(url);
		
	}
	
	function showRequest1(formData, jqForm, options) {  
		if($("#userName1").val()==""){
			userTip("userName1","请输入用户名");
			return false;
		}
		if($("#userPwd1").val()==""){
			userTip("userPwd1","请输入密码");
			return false;
		}
		return true;
	}
	function showResponse1(responseText, statusText, xhr, $form)  { 
		eval("var data="+responseText);
		
		var type='2';
		var info="系统错误！";
		var url="?g=Home&m=Skin&a=login";
		var rs=parseInt(data.status);
		if(rs==1){
			//登录成功
			type='1';
			info="登录成功！";
			//url="?g=Home&m=Skin";
			url="?g=Home&m=Order&a=srvlist";
		}else if(rs==3){
			//用户名错误
			type='2';
			info="用户名错误！";
			
		}else if(rs==4){
			//密码错误
			type='2';
			info="密码错误！";
			
		}else if(rs==5){
			//密码错误
			type='2';
			info="无权限登录！";
			
		}
		window.location.href="?g=Home&m=Skin&a=message&type="+type+"&info="+encodeURI(info)+"&url="+encodeURIComponent(url);
		
	}
	

	function userTip(sob,ct){
		 // 阴影+圆角
	      $("#"+sob).qtip({
	        position: {
	          my: 'bottom left',
	          at: 'top right'
	        },
	        style: {
	          classes: 'ui-tooltip-red ui-tooltip-shadow ui-tooltip-rounded'
	        },
	        show: {
				event: false, // Don't specify a show event...
				ready: true // ... but show the tooltip when ready
			},
	        content: ct
	      });
	}
});
</script>
</literal>
<div class="main">
	<div class="login">
    	<div class="login_main">
        	<ul class="login_tab">
        	<if condition="$menu eq 7">
	        	<li class="on">用户登录</li>
	        	<li>安装队登录</li>
        	<else />
        		<li >用户登录</li>
	        	<li class="on">安装队登录</li>
        	</if>
            	
               
            </ul>
            <div class="tab_form">
            	<form action="?g=Home&m=Member&a=checkuser" method="post"  <if condition="$menu eq 7">class="on"</if> id="CRForm">
                    <fieldset>
                        <legend>登录表单</legend>
                        <div class="login_sm">请使用您提交服务单时使用的邮箱或手机号作为用户名</div>
                        <p><input id="userName" name="userName"  type="text" class="login_ipt" value="{$LOCATIONUSER}"  title="请输入用户名"/></p>
                        <p><input type="password" id="userPwd" name="userPwd" class="login_ipt" value=""  title="请输入密码"/></p>
                        <p><input id="useUser" name="useUser" value="y" checked type="checkbox"  class="checkbox" /> 记住用户名　　<input id="autologin" name="autologin" value="y" type="checkbox"  class="checkbox" /> 自动登录</p>
                        <input type="hidden" id="role" name="role" value="cr">
                        <p><input  type="button" class="login_btn" value="登录" id="CRLOGIN"/></p>
                        <p class="forget"><a href="?g=Home&m=Skin&a=pwd&ly=7">忘记密码</a></p>
                    </fieldset>
                </form>
            	<form action="?g=Home&m=Member&a=checkuser" method="post"  <if condition="$menu eq 8">class="on"</if>  id="SRVForm">
                    <fieldset>
                        <legend>安装队登录表单</legend>
                        <div class="login_sm">请使用您提交服务单时使用的邮箱或手机号作为用户名</div>
                        <p><input id="userName1" name="userName"  type="text" class="login_ipt" value="{$LOCATIONUSER}"  title="请输入安装队"/></p>
                        <p><input type="password" id="userPwd1" name="userPwd" class="login_ipt" value=""  title="请输入密码"/></p>
                        <p><input id="useUser1" name="useUser" value="y" checked type="checkbox"  class="checkbox" /> 记住用户名　　<input id="autologin1" name="autologin" value="y" type="checkbox"  class="checkbox" /> 自动登录</p>
                        <input type="hidden" id="role" name="role" value="srv">
                        <p><input type="button" class="login_btn" value="登录" id="SRVLOGIN"/></p>
                        <p class="forget"><a href="?g=Home&m=Skin&a=pwd&ly=8">忘记密码</a></p>
                    </fieldset>
                </form>
            </div>
        </div>
    </div>
</div>
<include file="./App/Tpl/Home/Default/shop.html" />
<include file="./App/Tpl/Home/Default/partners.html" />
<include file="./App/Tpl/Home/Default/Public/footer.html" />	